#-*- coding:utf-8 -*-
from scrapy.spiders import CrawlSpider,Request
from data5u.items import Data5UItem
from scrapy.selector import Selector

class idCard(CrawlSpider):
    name='idCard'
    allowed_domains=[]
#     start_url=''
#     def __init__(self,word):
#         self.word = word
#         self.word = self.word.strip()
    start_url = "http://id.weixingmap.com/"
    def start_requests(self):
        yield Request(self.start_url,self.idCard_parse)
        
    def idCard_parse(self,response):
        sel = Selector(response)
        phoneNum = sel.xpath('//*[@id="code"]/text()').extract()
        print phoneNum
#         numAttribution = sel.xpath('//*[@id="table1"]/tbody/tr[3]/td[1]/div/p[1]/font[1]/b/text()').extract()[0]
#         Operator = sel.xpath('//*[@id="table1"]/tbody/tr[3]/td[1]/div/p[1]/font[2]/b/text()').extract()[0]
#         print phoneNum,numAttribution,Operator